package com.ruoyi.order.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单对象 ver_order
 * 
 * @author ruoyi
 * @date 2025-08-21
 */
public class VerOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单号（主键） */
    private Long orderId;

    /** 用户ID（外键，关联user表） */
    @Excel(name = "用户ID", readConverterExp = "外=键，关联user表")
    private Long userId;

    private String orderNumber;

    /** 收货地址ID（外键，关联address 表) */
    @Excel(name = "收货地址ID", readConverterExp = "收货地址ID（外键，关联address 表)")
    private Long addressId;

    /** 订单总金额（含商品、运费等） */
    @Excel(name = "订单总金额", readConverterExp = "含=商品、运费等")
    private String totalAmount;

    /** 折扣类型（0无折扣，1优惠券，2积分抵扣，3满减） */
    @Excel(name = "折扣类型", readConverterExp = "0=无折扣，1优惠券，2积分抵扣，3满减")
    private Long discountType;

    /** 实付金额（扣除优惠券、积分后） */
    @Excel(name = "实付金额", readConverterExp = "扣=除优惠券、积分后")
    private String payAmount;

    /** 运费 */
    @Excel(name = "运费")
    private String freight;

    /** 订单状态（0待付款，1待发货，2待收货，3已完成，10已取消 */
    @Excel(name = "订单状态", readConverterExp = "订单状态（0待付款，1待发货，2待收货，3已完成，10已取消")
    private String status;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 发货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date shipTime;

    /** 确认收货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "确认收货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receiveTime;

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setAddressId(Long addressId) 
    {
        this.addressId = addressId;
    }

    public Long getAddressId() 
    {
        return addressId;
    }
    public void setTotalAmount(String totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public String getTotalAmount() 
    {
        return totalAmount;
    }
    public void setDiscountType(Long discountType) 
    {
        this.discountType = discountType;
    }

    public Long getDiscountType() 
    {
        return discountType;
    }
    public void setPayAmount(String payAmount) 
    {
        this.payAmount = payAmount;
    }

    public String getPayAmount() 
    {
        return payAmount;
    }
    public void setFreight(String freight) 
    {
        this.freight = freight;
    }

    public String getFreight() 
    {
        return freight;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }
    public void setShipTime(Date shipTime) 
    {
        this.shipTime = shipTime;
    }

    public Date getShipTime() 
    {
        return shipTime;
    }
    public void setReceiveTime(Date receiveTime) 
    {
        this.receiveTime = receiveTime;
    }

    public Date getReceiveTime() 
    {
        return receiveTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("userId", getUserId())
            .append("addressId", getAddressId())
            .append("totalAmount", getTotalAmount())
            .append("discountType", getDiscountType())
            .append("payAmount", getPayAmount())
            .append("freight", getFreight())
            .append("status", getStatus())
            .append("payTime", getPayTime())
            .append("shipTime", getShipTime())
            .append("receiveTime", getReceiveTime())
            .append("createTime", getCreateTime())
            .toString();
    }
}
